var a = getApp();

Page({
    data: {
        text: "通证充值爱心值",
        rechangeable: 0,
        count: "",
        scale: 0,
        value: 0,
        loading: !1
    },
    onLoad: function(a) {
        this.setData({
            value: a.value
        }), this.getData();
    },
    recharge: function() {
        var t = this;
        this.setData({
            loading: !0
        }), a._getNetWork({
            url: a.getNetAddresss("plugin.love-speed-pool.frontend.recharge.recharge"),
            data: {
                change_value: this.data.count,
                value: this.data.value
            },
            success: function(e) {
                t.setData({
                    loading: !1
                }), e.data.result, a.tips(e.data.msg);
            }
        });
    },
    getData: function() {
        var t = this;
        a._getNetWork({
            url: a.getNetAddresss("plugin.love-speed-pool.frontend.recharge.index"),
            data: {
                value: this.data.value
            },
            success: function(e) {
                if (e.data.result) {
                    t.setData({
                        currency_name: e.data.data.currency_name,
                        rechangeable: e.data.data.currency_total,
                        scale: e.data.data.fee_tip,
                        love_name: e.data.data.love_name
                    });
                    var n = e.data.data.currency_name + "充值" + e.data.data.love_name;
                    wx.setNavigationBarTitle({
                        title: n
                    });
                } else a.tips(e.data.msg);
            }
        });
    },
    onReady: function() {},
    onShow: function() {},
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {},
    onShareAppMessage: function() {},
    change: function(a) {
        this.setData({
            count: a.detail.value
        });
    }
});